#
# Cookbook Name:: om
# Recipe:: agent
#
# Copyright 2013, IBM
#
# All rights reserved - Do Not Redistribute
#
startinstr "Create customer_overrides.properties" 

wasuser = node[:was][:user]
wasgroup = node[:was][:group]
deployment = node[:deployment]

emailhost=""
search(:node, "deployment:#{deployment}").each do |anode|
    if anode.role?("postfix")
        emailhost = anode[:fqdn]
    end
end

wesbhost=""
search(:node, "deployment:#{deployment}").each do |anode|
    if anode.role?("caas_wesb")
        wesbhost = anode[:fqdn]
    end
end

template "/tmp/customer_overrides.properties" do
  source "customer_overrides.properties.erb"
  owner wasuser
  group wasgroup
  variables(
    :yfs_local => node[:om][:yfs_local],
    :install_dir => node[:om][:installDir],

		:build_customer_overrides => node[:build_customer_overrides]
		)
  action :create
end

stopinstr "Create customer_overrides.properties"


